#include "Map.h"
#include "AStar.h"
#include <vector>
#include <iostream>

using namespace std;

int main()
{
	CMap mapTest(70, 30);
	CAStar pathFinder;
	short points[4];
	memset(points, 0, sizeof(points));

	mapTest.GenBlock(1000);
	mapTest.Draw();

	mapTest.GenStartDest(points);

	cout << "Find path(" << points[0] << ", " 
		<< points[1] << ") to (" << points[2] << ", " << points[3] << ")" << endl;

	vector<S_POINT> s;
	pathFinder.FindPath(s, &mapTest, points[0], points[1], points[2], points[3]);


	cout << endl;

	if (s.size() > 0)
	{
		cout << "The Path is below(" << s.size() << "): " << endl;
		mapTest.DrawPath(s);
	}
	else
	{
		cout << "NO Path" << endl;
	}

	return 0;
}